package homewoek12月22号.demo1.d1;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        List<String> list = FileUtils.readLines(new File("src/com/czxy/demo1/d1/data.txt"));
        byte[] brr=new byte[list.size()];
        for (int i = list.size() - 1; i >= 0; i--) {
            String[] arr = list.get(i).split("=");
            brr[Integer.parseInt(arr[0])]= (byte) (Integer.parseInt(arr[1])+2);
        }
         FileUtils.writeByteArrayToFile(new File("src/com/czxy/demo1/d1/data.png"),brr);
    }
}
